// 有问题 还不能用
export function getDomHeightByClass(className: string) {
  let query: any = null;

  if (!query) {
    query = uni.createSelectorQuery();
  }
  return new Promise((resolve, reject) => {
    query
      .select(`.${className}`)
      .boundingClientRect((result: any) => {
        console.log(result, "rrrr", query);
        if (result?.height) {
          resolve(result.height);
        } else {
          console.log("error", "-----> ", className);
          reject();
        }
      })
      .exec();
  });
};
